<?php
/**
 *
 */

class SlideShow extends ModelBase
{
    public function __construct()
    {
        parent::__construct(__CLASS__);
    }

    public function getHtml()
    {
        $html = '';
        foreach ($this->listAll() as $row) {
            $template = new Template(TEMPLATE_DIR . 'slide-show-item.html');
            $template->setArray($row);
            $html = $template->render();
        }
        return $html;
    }

    /**
     * Lấy nội dung bên trong slideshow
     * @static
     * @return mixed|string
     */
    public static function getAll()
    {
        $o = new SlideShow();
        return $o->getHtml();
    }
}
